package com.niit;


import com.niit.service.DeptService;
import com.niit.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAop {
    public static void main(String[] args) {
        ApplicationContext ctx =
                new ClassPathXmlApplicationContext(
                        "spring-beans.xml");

        UserService userService = ctx.getBean(UserService.class);
        userService.getUsers("韩亮");
        userService.updateUsers();

        DeptService deptService = ctx.getBean(DeptService.class);
        deptService.getDepts(2001);
        deptService.updateDepts();
    }
}
